In the conventional NC apparatus, when a newly created part program is employed for processing the product, the machine is firstly not activated, but the syntax check for the program or the simulation of tool locus is made, and the machine is operated with no-load. Thereby, if there is no problem, the workpiece is mounted, processed as trial, and finally processed.
Referring to FIGS. 16 and 17, the conventional NC apparatus will be described below.
FIG. 16 is a block diagram of the conventional NC apparatus. In FIG. 16, reference numeral 1 denotes the NC apparatus, 2 denotes a CPU (Central Processing Unit), 3 denotes an input unit interface (hereinafter referred to as an I/F), 4 denotes apart program, and 5 denotes a data memory having a part program memory 6, a precalculation buffer 11, a parameter memory 9 and an axial data memory 10. Reference numeral 7 denotes a control program memory storing an analysis processing part 8, an interpolation processing part 12, a basic controlling part 26, an NC axis controlling part 13, a screen processing part 25, a PLC (Programmable Logic Controller) processing part 24, a spindle controlling part 19, and an acceleration or deceleration processing part 14, each of which is configured by a software program. Reference numeral 15 denotes a control axis I/F, 16 denotes a control axis drive unit, 17 denotes a control axis motor, 18 denotes a detector, 20 denotes a spindle I/F, 21 denotes a spindle drive unit, 22 denotes a spindle motor, and 23 denotes a detector.
The operation of the NC apparatus as shown in FIG. 16 will be described below.
The CPU 2 sequentially reads and executes a control program in accordance with a procedure programmed in computer language and implements the predetermined functions via a variety of IFs. The input unit I/F 3 is controlled by apart program reading program included in the basic controlling part 26, in which the part program 4 recorded in the recording medium is read, and stored as a part program file in the part program memory 6 within the data memory 5. The CPU 2 sequentially reads the part program from the part program memory 6 upon an automatic operation initiation command, whereby the analysis processing part 8 stored in the control program memory 7 analyzes the instructions described in the part program 4 and stores the analyzed data for each control element in the precalculation buffer 11.
The interpolation processing part 12 calculates the interpolation movement amount from each control axis data stored in the precalculation buffer 11 in accordance with various parameters stored in the parameter memory 9, using the axial data memory 10. The interpolation movement amount is input into the NC axis controlling part 13 to update the coordinate system or make the acceleration or deceleration control. This interpolation is intended to calculate the movement amount (micro line segment) for each axis per control unit time (hereinafter simply abbreviated as ΔT) of the NC apparatus 1, when a specified circular arc is performed at a specified rate, for example. The specified circular arc is formed by linking the micro line segments. The movement amount for each axis calculated at this time is the theoretical value out of consideration for the machine response at commanded speed. To drive the actual machine, it is required to make the acceleration or deceleration process by gradually increasing the speed and gradually decreasing the speed to prevent occurrence of mechanical vibrations. The acceleration or deceleration processing part 14, which is included in the NC axis controlling part 13, converts the interpolation movement amount output as nearly fixed speed into the movement amount subjected to acceleration or deceleration in accordance with an acceleration or deceleration pattern such as a linear or exponential function form selected from the parameter memory 9 and the time constant, and outputs the converted movement amount to the control axis I/F 15.
The control axis I/F 15 outputs the interpolation movement amount subjected to acceleration or deceleration processing for the corresponding axis in a group of control axis drive devices 16 connected to it. The control axis drive device 16 converts the input interpolation movement amount into the drive power, which is applied to the control axis motor 17 to drive the control axis motor 17. The rotation amount (angle and/or speed) of the control axis motor 17 is detected by the detector 18 such as an encoder, and fed back as the positional information to the axial data memory 10 via the control axis drive device 16 and the control axis I/F 15. Thereby, each control axis is controlled so that the tool or workpiece is moved to the specified position in the specified locus or speed.
For the spindle (typically around which the tool is rotated in the milling system or the workpiece is rotated in the turning system), like the control axis, a spindle command (S command) specified in the part program is analyzed by the analysis processing part 8, and the rotation number is obtained by the spindle controlling part 19. From this result, a rotating speed command of the motor is produced and output via the CPU 2 to the spindle I/F 20, whereby the spindle control data is output to the spindle drive device 21. The spindle control data is converted into a drive power of the spindle motor 22 by the spindle drive device 21, the drive power being applied to the spindle motor 22 to drive the spindle motor 22. The rotation amount (angle and/or speed) of the spindle motor 22 is detected by the detector 23 such as an encoder, and fed back through a speed loop to the spindle drive device 21, and fed back as the rotating speed information via the spindle I/F 20 to the axial data memory 10. Thereby, the spindle is controlled to get to the specified rotating speed.
FIG. 17 shows a data flow from the part program to the control of the motor by excerpting the main components from FIG. 16. These components are designated by the same reference numerals as in FIG. 16. The drive device 16 is represented by four axis drive devices 16a to 16d. 
For the part program stored in the program file (part program memory) 6, the contents of each command block in the part program are decrypted by the analysis processing part 8, the control data at each control address being stored in the precalculation buffer 11 after the necessary operations or processing. Using the movement amount of control axis and the feed speed data among the control data stored in the precalculation buffer 11, the movement amount per unit time, or the interpolation movement amount, is obtained in the interpolation processing part 12. The interpolation movement amount is produced as the nearly fixed value corresponding to the speed to come closer to the commanded speed during the execution.
If the interpolation movement amount is input in to the acceleration or deceleration processing part 14, it is converted in accordance with the preset acceleration or deceleration pattern and the time constant so that the movement speed of the tool or workpiece may draw a predetermined acceleration or deceleration pattern, and input into the group of drive devices 16a to 16d. 
The operation of the machine with a predetermined number of axes is controlled based on the part program by driving the motor with the above data flow to perform the machine processing.
By the way, generally, the NC apparatus has basically the configuration of von Neumann type computer using a microprocessor, and the software for controlling this system employs a time division control method using a real time operating system. In this system, a sequential part program that is a task related with hierarchical structure is executed in time division in a predetermined order upon an interrupt signal (hereinafter referred to as IT) for control unit time ΔT (e.g., 10 ms). Therefore, if the program being executed is interrupted halfway, the operation result may be output in blank. In the case of the NC apparatus, this appears as a phenomenon that the machine (tool) position control information does not exist, or null data is output. Though the interrupt itself has almost no influence on the processed face, the cycle time may be longer if the short time is accumulated. The blank time arises when there is dead time on the system configuration, a program execution suspension due to IT or priority level, or response idle time for executing the auxiliary command.
The details thereof will be described below.
(1) Dead Time on the System Configuration
The distribution data is not momentarily produced by automatically initiating the machine. A lot of tasks of reading and analyzing the part program, and making predetermined operations are firstly performed to prepare the distribution data for activating the machine. Accordingly, the dead time is necessarily produced to one degree or another. Usually, the time from the start of cycle to the start of distribution is 3IT (=30 ms) on average. Also, when the sub-program is called and analyzed after initiation, 2IT (=20 ms) is further needed.
(2) Program Execution Suspension
Since the analysis processing time of a macro program is long, a program execution suspension occurs due to an interrupt of upper-level task. In the NC apparatus, the program is executed, within a processing period (ΔT=10 ms), in the order of basic control (OS), NC axis control (acceleration or deceleration process), spindle control, pulse data conversion process, divided output process, interpolation process, PLC process, analysis process and screen process. When the time-consuming macro program is analyzed after the acceleration or deceleration or interpolation process having higher priority level, the program is suspended halfway if the processing is not ended within ΔT, and when the order of program processing comes around in the next ΔT, the program suspended at the previous time is continued. Accordingly, when it takes a long time to analyze the macro program, the idle time of ΔT*n (at least 2 cycles when interrupted) occurs, whereby the interpolation data for the next block may not be produced.
(3) Response Idle Time for Executing the Auxiliary Command
In the normal M command (auxiliary command) with external processing, when an M command completion signal is input from the external sequence, the already analyzed and prepared contents of the next buffer register are executed, and the analysis processing for the next program block is started. In the normal processing, since the M command completion signal is read by the NC that scans a completion signal set in the PLC, the time of 2 cycles (2ΔT) at maximum is required for this response, which becomes the dead time.
Also, the typical part program is composed of a so-called one system command in a combination of three or two axes such as X axis, Y axis and Z axis for the milling system or X axis and Z axis for the turning system, for example. On the contrary, a lathe part program of dual system control in which two systems having a single axis or multiple axes are independently provided or cooperate to process one workpiece is composed of commands for two axes for each system or a total of four axes. In this multi-system program, because dual system operations cooperate or continue, the operation timing or control pattern of one system should be changed in accordance with the operation pattern of the other system, whereby the processing time is shortened, or the load of the machine is relieved with the processing time unchanged.
Though the dead time is only small, in the so-called program check, the tool locus may be checked, but the dead time presence check or the timing check between systems can not be made. Also, since the dead time is not resolved by the simple edit or programming method, those problems were left unsolved.
If the workpiece having a processing time of 30 seconds is processed in continuous operation of 24 hours (1440 minutes), 2880 products are manufactured. Assuming that the time required for processing one workpiece is small but the dead time is at least about 0.1 seconds (10ΔT) per workpiece, more 10 products or less in a day, or more about 3500 products in a year are manufactured by removing the dead time.